package cn.anlaser.service;

import java.util.List;

import org.springframework.data.domain.Pageable;

import cn.anlaser.entity.ParentEntity;
import cn.anlaser.form.ParentForm;
import cn.anlaser.page.QueryPage;
import cn.anlaser.repository.ParentRepository;

public interface ParentService<Form extends ParentForm, Repository extends ParentRepository<Entity>, Entity extends ParentEntity<Entity>>
		extends CommonService<Form, Repository, Entity> {

	QueryPage<Entity> findParentTop(Form form, Pageable pageable);

	QueryPage<Entity> findByParent(Form Entity, Pageable pageable);

	List<Entity> findParentTop(Form form);

	List<Entity> findByParent(Form Entity);

	Entity add(Entity obj, Entity parent);
	
	Entity add(Form form,Entity parent);
}
